package com.bioroadlab.dao;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.bioroadlab.pojo.TestItem;

@Repository
public class TestItemDao extends BaseDao<TestItem, Integer> {
	public TestItem findTestItemBySn(String sn) {
		String hql = "from TestItem where sn=:sn";
		Query query = getSession().createQuery(hql);
		query.setParameter("sn", Integer.parseInt(sn));

		TestItem testItem = (TestItem) query.uniqueResult();
		return testItem;
	}
}
